@import 'tailwindcss';

/* 自定义样式 */
.example-card {
  transition: all 0.3s ease;
}

/* 确保网格中的卡片等高 */
#examples-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.example-card:hover {
  transform: translateY(-5px);
}

.image-container img {
  transition: transform 0.3s ease;
}

.image-container:hover img {
  transform: scale(1.05);
}

/* 加载动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.example-card {
  animation: fadeInUp 0.6s ease forwards;
}

.example-card:nth-child(1) {
  animation-delay: 0.1s;
}

.example-card:nth-child(2) {
  animation-delay: 0.2s;
}

.example-card:nth-child(3) {
  animation-delay: 0.3s;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .example-card {
    margin-bottom: 1rem;
  }
}

/* 按钮悬停效果 */
.example-card a {
  position: relative;
  overflow: hidden;
}

.example-card a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.example-card a:hover::before {
  left: 100%;
}
